<name>Coinneach Odhar</name>
<profession>Banker</profession>
<faction>Serenity</faction>
<dialogue>
  <greeting>
    <reply>
      <if><gold>1000</gold></if>
      <text>I see you know a little about money. What is it you come for?</text>
      <return>main</return>
    </reply>
    <reply>
      <text>You look like you don't have a coin between you! What's your business?</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <if>
        <key>!chestsdone</key>
        <key>chestsbooked</key>
        <key>caravan1</key>
        <key>caravan2</key>
        <key>caravan3</key>
        <key>caravan4</key>
        <key>caravan5</key>
        <key>caravan6</key>
        <key>caravan7</key>
        <key>tobaccodelivered</key>
        <key>fluffydelivered</key>
        <key>spyglassdelivered</key>
      </if>
      <text>We have found all the chests and delivered all the items.</text>
      <npc>
        <reply>
          <text>That is great, [race], I knew I could trust you!</text>
          <script>
            <key>chestsdone</key>
            <gold>1237</gold>
            <expall>2000</expall>
            <quest>Lost Chests|done</quest>
            <log>Reported Coinneach's chests found and all items delivered</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if><key>!chestsbooked</key></if>
      <text>We are very interested in collecting coins.</text>
      <npc>
        <reply>
          <text>Really? How convenient. As it happens, I have a quest for you. A while ago a caravan from Jadame lost 7 chests in a storm. They should contain some items that were ordered by the citizens of this province, and a few coins. If you find them all, and deliver the items, you can keep the gold.</text>
          <return>chests</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>Could you explain banking to us?</text>
      <npc>
        <reply>
          <text>Banking is the backbone of civilization. Without banks, there would be very litte business! Sometimes I dream that all the banks will be linked together. 
You can deposit some of your money here. If there is a Noble among you, you can even put your valuables in the vault and I'll keep them safe. Of course, seeing that you are foreigners and all, I cannot give you a loan.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>We'd like to do some business.</text>
      <npc>
        <reply>
          <if><hour>!8</hour></if>
          <text>The bank's not open yet, [gender]. Wait for the clock to strike eight.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><hour>20</hour></if>
          <text>Bank's closed for the day, sorry [gender].</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>Always a pleasure.</text>
          <script>
            <shop>Bank of Alvar</shop>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>Farewell!</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
  <chests>
    <option>
      <text>We will do this for you.</text>
      <npc>
        <reply>
          <text>Excellent. Remember, you do not only need to find the missing chests, but you must also deliver the lost items!</text>
          <script>
            <key>chestsbooked</key>
            <quest>Lost Chests|Find the seven chests that were lost in a storm and deliver the items</quest>
            <log>Received quest for lost chests from Coinneach Odhar</log>
            <key>caravan1</key>
            <key>caravan2</key>
            <key>caravan3</key>
            <key>caravan4</key>
            <key>caravan5</key>
            <key>caravan6</key>
            <key>caravan7</key>
            <item>Pier's Tobacco</item>
            <item>Fluffy</item>
            <item>Lynette's Spyglass</item>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
  </chests>
</dialogue>